import React from 'react';

export default ({ account }) => (
  <div>
    <dl>
      <dt>账户总览</dt>
      <dd>
        <span><span className="label">现金：</span> <em>{account.cash.toFixed(2)}</em></span>
        <span><span className="label">总资产：</span><em>{account.assetValue.toFixed(2)}</em></span>
        <span><span className="label">资产净值：</span><em>{account.unitPrice.toFixed(2)}</em></span>
      </dd>
    </dl>
    <dl>
      <dt>持仓统计</dt>
      <dd>
        <span><span className="label">持仓数: </span> <em>{account.opCount}</em></span>
        <span><span className="label">浮盈持仓数: </span> <em>{account.profitOpCount}</em></span>
        <span><span className="label">浮亏持仓数: </span> <em>{account.lossOpCount}</em></span>
      </dd>
    </dl>
  </div>);
